package com.anpxd.erpad.service

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import com.anpxd.erpad.ui.MainActivity
import com.anpxd.ewalker.utils.toast


/**
 * Creator : GG
 * Date    : 2018/2/6
 * Mail    : gg.jin.yu@gmai.com
 * Explain :
 */
class ContentReceiver :BroadcastReceiver() {
    override fun onReceive(context: Context?, intent: Intent?) {
        val it = Intent(context, MainActivity::class.java)
        it.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
        context?.startActivity(it)
        context?.toast("自动启动成功")
    }
}